<template>
	<view class="tp-bgf">
		<view class="tp-pd30">
			<jyf-parser :html="context" ref="article"></jyf-parser>
		</view>
	</view>
</template>

<script>
	import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
	export default {
		components: {
			jyfParser
		},
		data() {
			return {
				id: 1,
				textTitle: '', // 标题
				context: '', // 内容
			};
		},
		onLoad(opt) {
			this.id = opt && opt.id

			this.getInfo()
		},
		methods: {
			// 获取数据
			getInfo() {
				this.$http.get(this.$api.getbannerContent, {
					id: this.id,
				}).then(res => {
					if (res.code === 200) {
						uni.setNavigationBarTitle({
							title: res.data.name
						});
						this.context = res.data.content
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>
